800
How can I change the color for a particular bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001","B1")
			h := oItems:AddItem("Item 2")
			oItems:AddBar(h,"Task","01/04/2001","01/06/2001","B2")
			oItems:SetProperty("ItemBar",h,"B2",33/*exBarColor*/,255)
			oItems:AddBar(oItems:AddItem("Item 3"),"Task","01/06/2001","01/14/2001","B3")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
799
How can I change the color or visual appearance using EBN files for a particular bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAEGg4BGoCg6AADACAxRDAMgBQKAAzQFAYZhhBaERiGEaIJhUAIIRZGMQxXAcMQvDSKQJhGLhQiSJoJDSBEgSXDIZQ5D6OZYACDJQACJYJTbAYzyPJkPRAA6EZCmGAwCglf5HABRb7xNLkbQ8GySKJnWCQJhoD5BSLCNRUTRFFQtGgZBpEWwLCjQNQwWLKFoTJIEPSBDKqYDoKYqTgOOZOThHQz3HakQRdAa/ZpnaKpUo2d47XjMWBwGA0EzeAAGaxoShqdoiFaGU7UOJVJBOGwHK6BchoMAKbp6XoVWRaOAWLZWVABM7XLZxbLccyGfZ1XhdV5UbqUMznR7PNrjLKIJpCOJbbyAFwgBaeQABYLhK7iHRmi8XYwjMWpjFWOx1GIB5LmgdB4HCEBECSIBpDGHQOicIwokYPImikEIJj6eJIloEgogSc40FGcJEFiYZIG2VIoAURw1g2QxyAQNwNAMPJOgIYI4CoDIBmAeAKBIUpQDU" +;
		"KJYDoTpIB4vxgmgdgNgeYZDDoFw7CEJhQn+BohmKfImCWSZRlgYwikYMQ0gwF4DniTA/gwBJYjQYwsgoIg6AyCRQDiIJODAZBImoOguAmMZ4lQLIJjOMI3CYZJpEIT4KiKSI6DqD5ZGAAgHC2DAjBYR4SGUGYGE+GIlCmFhRhIB5iFAbwWsiJgMhoCoxngV4ZCcSYOHaGYnHmIg8COJpoCoOISmSWZeHWHgoEkRoAg4EIYB4NogmiSgKg6GRjGoJgFh+ZJKDaBYjmgaQygiBRUHmbhoDsTAyiqIIoioGoOw8aoKhKKoemeOIaAeF5HmqHoqiyKxKgYaN/locgBiuZRojoVIok8cwsjaMBLGqDoAhGIpoEYWYEmAIxUkQLZmgiYg2g2I4JiCQwuAqWIOIkEAQICA==")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("Color",0x1000000)
				oBar:Height := 16
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001","B1")
			h := oItems:AddItem("Item 2")
			oItems:AddBar(h,"Task","01/04/2001","01/06/2001","B2")
			oItems:SetProperty("ItemBar",h,"B2",33/*exBarColor*/,255)
			oItems:AddBar(oItems:AddItem("Item 3"),"Task","01/06/2001","01/14/2001","B3")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
798
How can I resize programmatically a bar
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Item 1")
			oItems:AddBar(h,"Task","01/04/2001","01/06/2001","B2")
			oItems:SetProperty("ItemBar",h,"B2",513/*exBarDuration*/,1)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
797
How can I move programmatically a bar
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Item 1")
			oItems:AddBar(h,"Task","01/04/2001","01/06/2001","B2")
			oItems:SetProperty("ItemBar",h,"B2",514/*exBarMove*/,-2)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
796
How can I select displaying the histogram for an item and all its child items

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems
	LOCAL h,h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:MarkSearchColumn := .F.
		oG2antt:ShowFocusRect := .F.
		oG2antt:Columns():Add("Tasks")
		oColumn := oG2antt:Columns():Add("Hist")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
			oColumn:AllowSizing := .F.
			oColumn:Width := 18
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:NonworkingDays := 0
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:FirstVisibleDate := "06/20/2005"
			oChart:HistogramVisible := .T.
			oChart:HistogramView := 67348/*0x10000+exHistogramNoGrouping+exHistogramRecLeafItems+exHistogramLeafItems+exHistogramUnlockedItems+exHistogramCheckedItems*/
			oChart:HistogramHeight := 64
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("HistogramCriticalColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oBar:HistogramPattern := 512/*exBezierCurve*/
				oBar:HistogramType := 1/*exHistOverAllocation*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project 1")
			oItems:AddBar(h,"Summary","06/21/2005","07/01/2005")
			h1 := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(h1,"Task","06/21/2005","06/28/2005")
			oItems:SetProperty("CellMerge",h1,0,1)
			oItems:DefineSummaryBars(h,"",h1,"")
			h1 := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(h1,"Task","06/23/2005","07/01/2005","E")
			oItems:SetProperty("CellMerge",h1,0,1)
			oItems:DefineSummaryBars(h,"",h1,"E")
			oItems:SetProperty("ItemBar",h1,"E",21/*exBarEffort*/,5)
			h1 := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(h1,"Task","06/25/2005","06/27/2005","E")
			oItems:SetProperty("CellMerge",h1,0,1)
			oItems:DefineSummaryBars(h,"",h1,"E")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("CellState",h,1,1)
			h := oItems:AddItem("Project 2")
			oItems:AddBar(h,"Summary","06/26/2005","07/06/2005")
			h1 := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(h1,"Task","06/26/2005","07/02/2005")
			oItems:SetProperty("CellMerge",h1,0,1)
			oItems:DefineSummaryBars(h,"",h1,"")
			h1 := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(h1,"Task","06/28/2005","07/06/2005","E")
			oItems:SetProperty("CellMerge",h1,0,1)
			oItems:DefineSummaryBars(h,"",h1,"E")
			oItems:SetProperty("ItemBar",h1,"E",21/*exBarEffort*/,5)
			h1 := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(h1,"Task","06/30/2005","07/02/2005","E")
			oItems:SetProperty("CellMerge",h1,0,1)
			oItems:DefineSummaryBars(h,"",h1,"E")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("CellState",h,1,1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
795
How can I select or specify the items being included in the histogram, (using a different column )

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:MarkSearchColumn := .F.
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:HistogramVisible := .T.
			oChart:HistogramView := 65540/*0x10000+exHistogramCheckedItems*/
			oChart:HistogramHeight := 32
			oChart:Bars:Item("Task"):HistogramPattern := 6/*exPatternBDiagonal*/
		oG2antt:Columns():Add("Column")
		oColumn := oG2antt:Columns():Add("Histogram")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:AllowSizing := .F.
			oColumn:Width := 18
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/03/2001","01/05/2001")
			h := oItems:AddItem("Item 2")
			oItems:AddBar(h,"Task","01/04/2001","01/07/2001")
			oItems:SetProperty("CellState",h,1,1)
			h := oItems:AddItem("Item 3")
			oItems:AddBar(h,"Task","01/02/2001","01/05/2001")
			oItems:SetProperty("CellState",h,1,1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
794
How can I select or specify the items being included in the histogram

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:HistogramVisible := .T.
			oChart:HistogramView := 4/*exHistogramCheckedItems*/
			oChart:HistogramHeight := 32
			oChart:Bars:Item("Task"):HistogramPattern := 6/*exPatternBDiagonal*/
		oG2antt:Columns():Add("Column"):SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/03/2001","01/05/2001")
			h := oItems:AddItem("Item 2")
			oItems:AddBar(h,"Task","01/04/2001","01/07/2001")
			oItems:SetProperty("CellState",h,0,1)
			h := oItems:AddItem("Item 3")
			oItems:AddBar(h,"Task","01/02/2001","01/05/2001")
			oItems:SetProperty("CellState",h,0,1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
793
Is there any option to display the histogram for selected items only

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:SingleSel := .F.
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:HistogramVisible := .T.
			oChart:HistogramView := 2/*exHistogramSelectedItems*/
			oChart:HistogramHeight := 32
			oChart:Bars:Item("Task"):HistogramPattern := 6/*exPatternBDiagonal*/
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/03/2001","01/05/2001")
			oItems:AddBar(oItems:AddItem("Item 2"),"Task","01/04/2001","01/07/2001")
			oItems:AddBar(oItems:AddItem("Item 3"),"Task","01/02/2001","01/06/2001")
			oItems:SelectAll()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
792
Is it possible to add bars to a summary bar so, they get resized or moved as soon as a bar is changed

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,hProject,hR1,hR2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oG2antt:ShowFocusRect := .F.
		oG2antt:HasLines := 0/*exNoLine*/
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:HasLines := 0/*exNoLine*/
		oG2antt:Indent := 14
		oG2antt:FullRowSelect := 0/*exColumnSel*/
		oG2antt:ScrollBySingleLine := .T.
		oChart := oG2antt:Chart()
			oChart:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
			oChart:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 245,245,245 } )  , .F. ))
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:AllowLinkBars := .F.
			oChart:FirstVisibleDate := "01/01/2008"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,98)
		oG2antt:Columns():Add("")
		oItems := oG2antt:Items()
			hProject := oItems:AddItem("Project")
			oItems:SetProperty("ItemHeight",hProject,26)
			oItems:AddBar(hProject,"Project Summary","01/02/2008","01/05/2008")
			oItems:SetProperty("ItemBar",hProject,"",3/*exBarCaption*/,"<br>< <b>Project Summary</b> >")
			hR1 := oItems:InsertItem(hProject,,"Team 1")
			oItems:SetProperty("ItemHeight",hR1,30)
			oItems:AddBar(hR1,"Summary","01/02/2008","01/08/2008")
			oItems:SetProperty("ItemBar",hR1,"",3/*exBarCaption*/,"<br> Team <b>1</b> Summary ")
			h1 := oItems:InsertItem(hR1,,"Member 1")
			oItems:AddBar(h1,"Task","01/02/2008","01/07/2008")
			oItems:DefineSummaryBars(hR1,"",h1,"")
			h1 := oItems:InsertItem(hR1,,"Member 2")
			oItems:AddBar(h1,"Task","01/04/2008","01/09/2008")
			oItems:DefineSummaryBars(hR1,"",h1,"")
			h1 := oItems:InsertItem(hR1,,"Member 3")
			oItems:AddBar(h1,"Task","01/05/2008","01/10/2008")
			oItems:DefineSummaryBars(hR1,"",h1,"")
			oItems:SetProperty("ExpandItem",hR1,.T.)
			hR2 := oItems:InsertItem(hProject,,"Team 2")
			oItems:SetProperty("ItemHeight",hR2,30)
			oItems:AddBar(hR2,"Summary","01/02/2008","01/08/2008")
			oItems:SetProperty("ItemBar",hR2,"",3/*exBarCaption*/,"<br> Team <b>2</b> Summary ")
			h2 := oItems:InsertItem(hR2,,"Member 1")
			oItems:AddBar(h2,"Task","01/04/2008","01/07/2008")
			oItems:DefineSummaryBars(hR2,"",h2,"")
			h2 := oItems:InsertItem(hR2,,"Member 2")
			oItems:AddBar(h2,"Task","01/08/2008","01/11/2008")
			oItems:DefineSummaryBars(hR2,"",h2,"")
			h2 := oItems:InsertItem(hR2,,"Member 3")
			oItems:AddBar(h2,"Task","01/05/2008","01/12/2008")
			oItems:DefineSummaryBars(hR2,"",h2,"")
			oItems:SetProperty("ExpandItem",hR2,.T.)
			oItems:SetProperty("ExpandItem",oItems:FirstVisibleItem(),.T.)
			oItems:DefineSummaryBars(hProject,"",hR1,"")
			oItems:DefineSummaryBars(hProject,"",hR2,"")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
791
Is it possible to define level in terms of just increasing numbers (not a Date)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,32)
			oChart:UnitWidth := 32
			oChart:FirstVisibleDate := 1000
			oChart:Level(0):Label := "<%i%>"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
790
How can I hide the non-working units ( days or hours )

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 2
			oLevel := oChart:Level(0)
				oLevel:Label := "<%dddd%>"
				oLevel:Alignment := 1/*CenterAlignment*/
			oChart:Level(1):Label := 65536
			oChart:NonworkingHours := 16773375
			oChart:ShowNonworkingUnits := .F.
			oChart:ShowNonworkingDates := .F.
			oChart:ShowNonworkingHours := .F.
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
789
Is there a way to have the display show the word "Noon" instead "12:00 PM" in the chart's header/levels

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oLevel,oLevel1,oLevel2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:FirstVisibleDate := "01/01/2001 10:00:00"
			oChart:LevelCount := 3
			oLevel := oChart:Level(0)
				oLevel:Label := "<b><%mmm%> <%d%>, <%yyyy%></b>"
				oLevel:Alignment := 1/*CenterAlignment*/
				oLevel:Unit := 4096/*exDay*/
			oLevel1 := oChart:Level(1)
				oLevel1:Label := "<%h%>:00 <%AM/PM%>"
				oLevel1:Alignment := 1/*CenterAlignment*/
				oLevel1:Unit := 65536/*exHour*/
				oLevel1:DrawTickLines := -1/*exLevelDefaultLine*/
				oLevel1:DrawGridLines := .T.
				oLevel1:SetProperty("ReplaceLabel","12:00 PM","<fgcolor=0000FF><b>Noon</b></fgcolor>")
			oLevel2 := oChart:Level(2)
				oLevel2:Label := ""
				oLevel2:Unit := 1048576/*exMinute*/
				oLevel2:Count := 15

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
788
How can I change the selection background color in the chart area

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Chart():SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/06/2001","01/14/2001")
			oItems:SetProperty("SelectItem",oItems:FirstVisibleItem(),.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
787
How can I change the selection background color in the chart area

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Chart():SetProperty("SelBackColor",0x1000000)
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/06/2001","01/14/2001")
			oItems:SetProperty("SelectItem",oItems:FirstVisibleItem(),.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
786
Is there any way to extend the selection on the chart

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Chart():SetProperty("SelBackColor",oG2antt:SelBackColor())
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/06/2001","01/14/2001")
			oItems:SetProperty("SelectItem",oItems:FirstVisibleItem(),.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
785
How can I display the column's header using multiple lines

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:HeaderHeight := 128
		oG2antt:HeaderSingleLine := .F.
		oG2antt:Columns():Add("This is just a column that should break the header."):Width := 32
		oG2antt:Columns():Add("This is just another column that should break the header.")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
784
Can I move or limit moving or resizing a bar
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oG2antt:DefaultItemHeight := 19
		oG2antt:SetProperty("GridLineColor",AutomationTranslateColor( GraMakeRGBColor  ( { 220,220,220 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("ScrollRange",0/*exStartDate*/,"12/28/2000")
			oChart:SetProperty("ScrollRange",1/*exEndDate*/,"01/12/2001")
			oChart:DrawDateTicker := .T.
			oChart:NonworkingDays := 0
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:LevelCount := 2
			oChart:Level(0):DrawGridLines := .F.
			oChart:AllowLinkBars := .F.
			oChart:Bars:Item("Task"):OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
		oG2antt:Columns():Add("Info")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Fixed bar")
			oItems:AddBar(h,"Task","01/02/2001","01/05/2001","F")
			oItems:SetProperty("ItemBar",h,"F",10/*exBarCanResize*/,.F.)
			oItems:SetProperty("ItemBar",h,"F",11/*exBarCanMove*/,.F.)
			oItems:SetProperty("ItemBar",h,"F",6/*exBarToolTip*/,"This bar is fixed, so the uer can move or resize it")
			h := oItems:AddItem("Moveable but not-resizable bar")
			oItems:AddBar(h,"Task","01/03/2001","01/06/2001","F")
			oItems:SetProperty("ItemBar",h,"F",6/*exBarToolTip*/,"This bar is moveable inside the item, but the user can't resize it.")
			oItems:SetProperty("ItemBar",h,"F",10/*exBarCanResize*/,.F.)
			h := oItems:AddItem("Resizable but not moveable bar")
			oItems:AddBar(h,"Task","01/03/2001","01/06/2001","F")
			oItems:SetProperty("ItemBar",h,"F",6/*exBarToolTip*/,"This bar is resizable but the user can't move it.")
			oItems:SetProperty("ItemBar",h,"F",11/*exBarCanMove*/,.F.)
			h := oItems:AddItem("Range Moveable bar")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","F")
			oItems:SetProperty("ItemBar",h,"F",6/*exBarToolTip*/,"This bar can be moved inside the displayed range.")
			oItems:SetProperty("ItemBar",h,"F",22/*exBarMinStart*/,"01/02/2001")
			oItems:SetProperty("ItemBar",h,"F",25/*exBarMaxEnd*/,"01/08/2001")
			oItems:SetProperty("ItemBar",h,"F",26/*exBarShowRange*/,32)
			oItems:SetProperty("ItemBar",h,"F",27/*exBarShowRangeTransparent*/,90)
			h := oItems:AddItem("Range Moveable Upper No Limit bar")
			oItems:AddBar(h,"Task","01/03/2001","01/06/2001","F")
			oItems:SetProperty("ItemBar",h,"F",6/*exBarToolTip*/,"This bar can be moved inside the displayed range.")
			oItems:SetProperty("ItemBar",h,"F",22/*exBarMinStart*/,"01/02/2001")
			oItems:SetProperty("ItemBar",h,"F",26/*exBarShowRange*/,32)
			oItems:SetProperty("ItemBar",h,"F",27/*exBarShowRangeTransparent*/,90)
			h := oItems:AddItem("Range Moveable Lower No Limit bar")
			oItems:AddBar(h,"Task","01/03/2001","01/06/2001","F")
			oItems:SetProperty("ItemBar",h,"F",6/*exBarToolTip*/,"This bar can be moved inside the displayed range.")
			oItems:SetProperty("ItemBar",h,"F",25/*exBarMaxEnd*/,"01/08/2001")
			oItems:SetProperty("ItemBar",h,"F",26/*exBarShowRange*/,32)
			oItems:SetProperty("ItemBar",h,"F",27/*exBarShowRangeTransparent*/,90)
			h := oItems:AddItem("Moveable bar inside the item")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","F")
			oItems:SetProperty("ItemBar",h,"F",6/*exBarToolTip*/,"This bar can be moved/resized anywhere inside the item.")
			h := oItems:AddItem("Moveable bar to other items too")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","FA")
			oItems:SetProperty("ItemBar",h,"FA",6/*exBarToolTip*/,"This bar can be moved to other items too. Click the bar and move it to other items too.")
			oItems:SetProperty("ItemBar",h,"FA",3/*exBarCaption*/,"free")
			oItems:SetProperty("ItemBar",h,"FA",4/*exBarHAlignCaption*/,18)
			oItems:SetProperty("ItemBar",h,"FA",28/*exBarCanMoveToAnother*/,.T.)
			h := oItems:AddItem("Moveable inside item")
			oItems:AddBar(h,"Task","01/03/2001","01/05/2001","F1")
			h := oItems:AddItem("Moveable inside item")
			oItems:AddBar(h,"Task","01/03/2001","01/05/2001","F1")
			h := oItems:AddItem("Moveable inside item")
			oItems:AddBar(h,"Task","01/03/2001","01/05/2001","F1")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
783
Can I move a bar from an item to another by drag and drop
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Chart():AllowLinkBars := .F.
		oG2antt:Chart():Bars:Item("Task"):OverlaidType := 257/*exOverlaidBarsTransparent+exOverlaidBarsOffset*/
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001","A")
			h := oItems:AddItem("Item 2")
			oItems:AddBar(h,"Task","01/05/2001","01/07/2001","B")
			oItems:SetProperty("ItemBar",h,"B",28/*exBarCanMoveToAnother*/,.T.)
			oItems:AddItem("Item 3")
			oItems:AddItem("Item 4")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
782
Can I move a bar from an item to another
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001","A")
			h := oItems:AddItem("Item 2")
			oItems:AddBar(h,"Task","01/06/2001","01/14/2001","B")
			oItems:SetProperty("ItemBar",h,"B",512/*exBarParent*/,oItems:FirstVisibleItem())

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
781
How can change the width, transparency, style, visual appearance ( EBN), of the vertical bar that shows the current date-time

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:Level(0):Label := 1048576
			oLevel := oChart:Level(1)
				oLevel:Label := "<%ss%>"
				oLevel:Count := 15
			oChart:SetProperty("MarkNowColor",0x1000000)
			oChart:MarkNowWidth := 6
			oChart:MarkNowTransparent := 50
		oG2antt:Columns():Add("Tasks")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/01/2008","01/01/2018")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
780
How can change the width, style, visual appearance ( EBN), of the vertical bar that shows the current time

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:Level(0):Label := 1048576
			oLevel := oChart:Level(1)
				oLevel:Label := "<%ss%>"
				oLevel:Count := 15
			oChart:SetProperty("MarkNowColor",0x1000000)
			oChart:MarkNowWidth := 6
		oG2antt:Columns():Add("Tasks")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/01/2008","01/01/2018")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
779
How can I show a vertical bar that indicates the current time

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:Level(0):Label := 1048576
			oLevel := oChart:Level(1)
				oLevel:Label := "<%ss%>"
				oLevel:Count := 15
			oChart:SetProperty("MarkNowColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
			oChart:MarkNowWidth := 7
		oG2antt:Columns():Add("Tasks")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/01/2008","01/01/2018")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
778
How can I show semi-transparent the vertical bar that indicates the current time

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:Level(0):Label := 1048576
			oLevel := oChart:Level(1)
				oLevel:Label := "<%ss%>"
				oLevel:Count := 15
			oChart:SetProperty("MarkNowColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
			oChart:MarkNowWidth := 7
			oChart:MarkNowTransparent := 50
		oG2antt:Columns():Add("Tasks")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/01/2008","01/01/2018")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
777
Is there any way to highlight or show a vertical bar that indicates the current time, from 15 to 15 seconds

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():LevelCount := 2
		oG2antt:Chart():Level(0):Label := 1048576
		oLevel := oG2antt:Chart():Level(1)
			oLevel:Label := "<%ss%>"
			oLevel:Count := 15
		oG2antt:Chart():SetProperty("MarkNowColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
		oG2antt:Chart():MarkNowCount := 15
		oG2antt:Chart():MarkNowWidth := 3

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
776
Is there any way to highlight or show a vertical bar that indicates the current time, from minute to minute, hour and so on
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:UnitWidth := 48
			oChart:LevelCount := 1
			oChart:Level(0):Label := 1048576
			oChart:SetProperty("MarkNowColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oChart:MarkNowUnit := 1048576/*exMinute*/
			oChart:MarkNowWidth := oChart:UnitWidth()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
775
Is there any way to highlight or show a vertical bar that indicates the current time

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():LevelCount := 2
		oG2antt:Chart():Level(0):Label := 1048576
		oLevel := oG2antt:Chart():Level(1)
			oLevel:Label := "<%ss%>"
			oLevel:Count := 15
		oG2antt:Chart():SetProperty("MarkNowColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
774
Is there a way of making a bar flash on the screen
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Flashy task")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",19/*exBarTransparent*/,80)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
773
Is there any option to display overlay bars as a stack, or bars that laid over or cover other bars (exOverlaidBarsStackAutoArrange)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:Columns():Add("Task")
		oG2antt:DrawGridLines := 1/*exHLines*/
		oChart := oG2antt:Chart()
			oChart:DrawGridLines := 1/*exHLines*/
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:AllowLinkBars := .F.
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Task")
				oBar:OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
				oBar:SetProperty("Overlaid",256/*exOverlaidBarsTransparent*/,80)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h,"Task","01/03/2001","01/05/2001","A2")
			oItems:AddBar(h,"Task","01/04/2001","01/07/2001","A3")
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/07/2001","01/10/2001","A1")
			oItems:AddBar(h,"Task","01/08/2001","01/12/2001","A3")
			h := oItems:AddItem()
			oItems:SetProperty("SelectableItem",h,.F.)
			oItems:AddBar(h,"","01/07/2001","01/11/2001",,"<fgcolor=FF0000>Click a bar and move to a new position.")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
772
Is there any option to display overlay bars as a stack, or bars that laid over or cover other bars (overlay)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:Columns():Add("Task")
		oG2antt:DrawGridLines := 1/*exHLines*/
		oChart := oG2antt:Chart()
			oChart:DrawGridLines := 1/*exHLines*/
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:AllowLinkBars := .F.
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:Bars:Item("Task"):OverlaidType := 3/*exOverlaidBarsStack*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h,"Task","01/03/2001","01/05/2001","A2")
			oItems:AddBar(h,"Task","01/04/2001","01/07/2001","A3")
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/07/2001","01/10/2001","A1")
			oItems:AddBar(h,"Task","01/08/2001","01/12/2001","A3")
			h := oItems:AddItem()
			oItems:SetProperty("SelectableItem",h,.F.)
			oItems:AddBar(h,"","01/07/2001","01/11/2001",,"<fgcolor=FF0000>Click a bar and move to a new position.")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
771
Does the overlay also work in milestone bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1
	LOCAL oBars
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 22
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oBars := oChart:Bars()
				oBar := oBars:Item("Task")
					oBar:OverlaidType := 257/*exOverlaidBarsTransparent+exOverlaidBarsOffset*/
					oBar:OverlaidGroup := "Milestone"
				oBar1 := oBars:Item("Milestone")
					oBar1:OverlaidType := 257/*exOverlaidBarsTransparent+exOverlaidBarsOffset*/
					oBar1:OverlaidGroup := "Task"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/04/2001","01/07/2001","A1")
			oItems:AddBar(h,"Milestone","01/08/2001","01/08/2001","M")
			oItems:AddBar(h,"Task","01/09/2001","01/12/2001","A3")
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Milestone","01/04/2001","01/04/2001","M")
			oItems:AddBar(h,"Task","01/05/2001","01/08/2001","A1")
			oItems:AddBar(h,"Task","01/09/2001","01/12/2001","A3")
			h := oItems:AddItem()
			oItems:SetProperty("SelectableItem",h,.F.)
			oItems:AddBar(h,"","01/07/2001","01/11/2001",,"<fgcolor=FF0000>Click a bar and move to a new position.")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
770
Is there any option to display overlaid bars of different types, or bars that laid over or cover other bars (overlay)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oBars
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:DefaultItemHeight := 22
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oBars := oChart:Bars()
				oBars:CallMethod("Copy","Task","RTask"):SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oBars:CallMethod("Copy","Task","GTask"):SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
				oBar := oBars:Item("Task")
					oBar:OverlaidType := 257/*exOverlaidBarsTransparent+exOverlaidBarsOffset*/
					oBar:SetProperty("Overlaid",256/*exOverlaidBarsTransparent*/,70)
					oBar:OverlaidGroup := "RTask,GTask"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h,"Task","01/03/2001","01/05/2001","A2")
			oItems:AddBar(h,"Task","01/04/2001","01/07/2001","A3")
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/04/2001","01/08/2001","A1")
			oItems:AddBar(h,"GTask","01/07/2001","01/12/2001","A2")
			oItems:AddBar(h,"RTask","01/10/2001","01/15/2001","A3")
			h := oItems:AddItem()
			oItems:SetProperty("SelectableItem",h,.F.)
			oItems:AddBar(h,"","01/07/2001","01/11/2001",,"<fgcolor=FF0000>Click a bar and move to a new position.")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
769
Is there any option to display overlaid bars, or bars that laid over or cover other bars (overlay)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1
	LOCAL oBars
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:DefaultItemHeight := 22
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oBars := oChart:Bars()
				oBar := oBars:CallMethod("Copy","Task","BTask")
					oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oBar1 := oBars:Item("Task")
					oBar1:OverlaidType := 2/*exOverlaidBarsIntersect*/
					oBar1:SetProperty("Overlaid",2/*exOverlaidBarsIntersect*/,"BTask")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h,"Task","01/03/2001","01/05/2001","A2")
			oItems:AddBar(h,"Task","01/04/2001","01/07/2001","A3")
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/07/2001","01/10/2001","A1")
			oItems:AddBar(h,"Task","01/08/2001","01/12/2001","A3")
			h := oItems:AddItem()
			oItems:SetProperty("SelectableItem",h,.F.)
			oItems:AddBar(h,"","01/07/2001","01/11/2001",,"<fgcolor=FF0000>Click a bar and move to a new position.")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
768
Is there any option to display overlaid bars, or bars that laid over or cover other bars (overlay)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:DefaultItemHeight := 22
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Task")
				oBar:OverlaidType := 257/*exOverlaidBarsTransparent+exOverlaidBarsOffset*/
				oBar:SetProperty("Overlaid",256/*exOverlaidBarsTransparent*/,70)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h,"Task","01/03/2001","01/05/2001","A2")
			oItems:AddBar(h,"Task","01/04/2001","01/07/2001","A3")
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/07/2001","01/10/2001","A1")
			oItems:AddBar(h,"Task","01/08/2001","01/12/2001","A3")
			h := oItems:AddItem()
			oItems:SetProperty("SelectableItem",h,.F.)
			oItems:AddBar(h,"","01/07/2001","01/11/2001",,"<fgcolor=FF0000>Click a bar and move to a new position.")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
767
Is there any option to display overlaid bars, or bars that laid over or cover other bars (overlay)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:DefaultItemHeight := 22
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:Bars:Item("Task"):OverlaidType := 1/*exOverlaidBarsOffset*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h,"Task","01/03/2001","01/05/2001","A2")
			oItems:AddBar(h,"Task","01/04/2001","01/07/2001","A3")
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/07/2001","01/10/2001","A1")
			oItems:AddBar(h,"Task","01/08/2001","01/12/2001","A3")
			h := oItems:AddItem()
			oItems:SetProperty("SelectableItem",h,.F.)
			oItems:AddBar(h,"","01/07/2001","01/11/2001",,"<fgcolor=FF0000>Click a bar and move to a new position.")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
766
How can include the values in the inner cells in the drop down filter window
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oItems
	LOCAL s

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:DrawGridLines := -2/*exRowLines*/
		oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oG2antt:SetProperty("Description",1/*exFilterBarBlanks*/,"")
		oG2antt:SetProperty("Description",2/*exFilterBarNonBlanks*/,"")
		oColumn := oG2antt:Columns():Add("Single Column")
			oColumn:HTMLCaption := "Single column with <b>inner cells</b>"
			oColumn:ToolTip := "Click the drop down filter button, and the filter list includes the inner cells values too."
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:FilterList := 64/*exIncludeInnerCells*/
		oG2antt:ShowFocusRect := .F.
		oItems := oG2antt:Items()
			s := oItems:SplitCell(oItems:AddItem("S 1.1"),0)
			oItems:SetProperty("CellValue",,s,"S 1.2")
			oItems:SetProperty("CellHAlignment",,s,1/*CenterAlignment*/)
			oItems:SetProperty("CellBackColor",,s,0x1000000)
			oItems:SetProperty("CellWidth",,s,84)
			s := oItems:SplitCell(oItems:AddItem("S 2.1"),0)
			oItems:SetProperty("CellValue",,s,"S 2.2")
			oItems:SetProperty("CellHAlignment",,s,1/*CenterAlignment*/)
			oItems:SetProperty("CellWidth",,s,84)
			s := oItems:SplitCell(oItems:AddItem("S 3.1"),0)
			oItems:SetProperty("CellValue",,s,"S 3.2")
			oItems:SetProperty("CellHAlignment",,s,1/*CenterAlignment*/)
			oItems:SetProperty("CellBackColor",,s,0x1000000)
			oItems:SetProperty("CellWidth",,s,84)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
765
How can I sort the value gets listed in the drop down filter window
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:MarkSearchColumn := .F.
		oG2antt:SetProperty("Description",0/*exFilterBarAll*/,"")
		oG2antt:SetProperty("Description",1/*exFilterBarBlanks*/,"")
		oG2antt:SetProperty("Description",2/*exFilterBarNonBlanks*/,"")
		oColumn := oG2antt:Columns():Add("P1")
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:FilterList := 16/*exSortItemsDesc*/
		oColumn1 := oG2antt:Columns():Add("P2")
			oColumn1:DisplayFilterButton := .T.
			oColumn1:DisplayFilterPattern := .F.
			oColumn1:FilterList := 32/*exSortItemsAsc*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Z3")
			oItems:SetProperty("CellValue",h,1,"C")
			oItems:SetProperty("CellValue",oItems:InsertItem(h,,"Z1"),1,"B")
			oItems:SetProperty("CellValue",oItems:InsertItem(h,,"Z2"),1,"A")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
764
Is there a way to break the hours into 15 minute increments just showing lines instead of the minute numbers

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oLevel,oLevel1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():FirstVisibleDate := "02/05/2008"
		oG2antt:Chart():LevelCount := 3
		oG2antt:Chart():Level(0):Label := "<b><%mmm%> <%dd%></b> <%yyyy%> "
		oLevel := oG2antt:Chart():Level(1)
			oLevel:Label := "<%hh%>"
			oLevel:Alignment := 1/*CenterAlignment*/
		oLevel1 := oG2antt:Chart():Level(2)
			oLevel1:Label := ""
			oLevel1:Unit := 1048576/*exMinute*/
			oLevel1:Count := 15
		oG2antt:Chart():UnitWidth := 6
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
763
How do I specify a range where the bar can be moved or resized and to highlight the range

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Chart():SetProperty("ScrollRange",0/*exStartDate*/,"01/01/2001")
		oG2antt:Chart():SetProperty("ScrollRange",1/*exEndDate*/,"01/07/2001")
		oG2antt:Chart():SetProperty("PaneWidth",.F.,128)
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Item 1")
			oItems:AddBar(h,"Task","01/01/2001","01/04/2001")
			oItems:SetProperty("ItemBar",h,"",22/*exBarMinStart*/,"01/02/2001")
			oItems:SetProperty("ItemBar",h,"",25/*exBarMaxEnd*/,"01/08/2001")
			oItems:SetProperty("ItemBar",h,"",26/*exBarShowRange*/,16777216)
			oItems:SetProperty("ItemBar",h,"",27/*exBarShowRangeTransparent*/,60)
			h := oItems:AddItem("Item 2")
			oItems:AddBar(h,"Task","01/01/2001","01/04/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
762
How do I specify a range where the bar can be moved or resized and to highlight the range

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Chart():SetProperty("ScrollRange",0/*exStartDate*/,"01/01/2001")
		oG2antt:Chart():SetProperty("ScrollRange",1/*exEndDate*/,"01/07/2001")
		oG2antt:Chart():SetProperty("PaneWidth",.F.,128)
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Item 1")
			oItems:AddBar(h,"Task","01/01/2001","01/04/2001")
			oItems:SetProperty("ItemBar",h,"",22/*exBarMinStart*/,"01/02/2001")
			oItems:SetProperty("ItemBar",h,"",25/*exBarMaxEnd*/,"01/08/2001")
			oItems:SetProperty("ItemBar",h,"",26/*exBarShowRange*/,32)
			oItems:SetProperty("ItemBar",h,"",27/*exBarShowRangeTransparent*/,90)
			h := oItems:AddItem("Item 2")
			oItems:AddBar(h,"Task","01/01/2001","01/04/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
761
How do I specify a range where the bar can be moved or resized and to highlight the range

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Chart():SetProperty("ScrollRange",0/*exStartDate*/,"01/01/2001")
		oG2antt:Chart():SetProperty("ScrollRange",1/*exEndDate*/,"01/07/2001")
		oG2antt:Chart():SetProperty("PaneWidth",.F.,128)
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Item 1")
			oItems:AddBar(h,"Task","01/01/2001","01/04/2001")
			oItems:SetProperty("ItemBar",h,"",22/*exBarMinStart*/,"01/02/2001")
			oItems:SetProperty("ItemBar",h,"",25/*exBarMaxEnd*/,"01/08/2001")
			oItems:SetProperty("ItemBar",h,"",26/*exBarShowRange*/,65286)
			oItems:SetProperty("ItemBar",h,"",27/*exBarShowRangeTransparent*/,90)
			h := oItems:AddItem("Item 2")
			oItems:AddBar(h,"Task","01/01/2001","01/04/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
760
How do I specify a range where the bar can be moved or resized
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Chart():SetProperty("ScrollRange",0/*exStartDate*/,"01/01/2001")
		oG2antt:Chart():SetProperty("ScrollRange",1/*exEndDate*/,"01/07/2001")
		oG2antt:Chart():SetProperty("PaneWidth",.F.,128)
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Item 1")
			oItems:AddBar(h,"Task","01/01/2001","01/04/2001")
			oItems:SetProperty("ItemBar",h,"",22/*exBarMinStart*/,"01/02/2001")
			oItems:SetProperty("ItemBar",h,"",25/*exBarMaxEnd*/,"01/08/2001")
			h := oItems:AddItem("Item 2")
			oItems:AddBar(h,"Task","01/01/2001","01/04/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
759
How can I change the visual appearance of the milestone bar using EBN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAEGg4BKMMQAAYAQGKIYBkAKBQAGaAoDDMMILQiMQwjRBMKgBBCLIxiGK4DhiF4aRTHUKAAKQahLEaSZLhEZRQiqA4sS5FQBSBDQFwSByEY6mSaYJAWK4tCyNM7SfQAbxnAgYaLAAYRUjuHZOTZAc4UfAdFL/K4AKrfeZIeAiCRQGiYZyHKaRShjDwXKLIIjbJhkNoJChCNQgBScPgxCx8JypaCaar2fjQM6zWAMdb2Cz7PjDH7wPA1WYJRaDYjhcB4LheAqGXBWUYLYb8XS3EKJYhiWA4HjqFjGJpcEzPbRiNx3H6SABlLLaLo7JpGO52FrTHZjXyzLqBVpoOyEbrmcozYzjN41RpWETfQYDcwteqcLprhGVZrm6dp8j4bAnDQP5Uh+OpcH6R4Lg2YJvEIeg6kWEoJB2ZZyG6GoLCSXxtG+IZ1GmfhJjcawNFWfB/h+V5pnUc5VhWeZ4BMX4jlySwtiAJodlEYRaBYFgHHgIA2gG" +;
		"ExkFUdxFl6A5hgUbgXgcVRzFiXA3CICARAEgI")
			oAppearance:Add(2,"CP:1 -6 0 5 0")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars():Add("MilestoneEBN")
				oBar:SetProperty("Color",0x2000000)
				oBar:Height := 14
		oG2antt:Columns():Add("Tasks")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Milestone"),"Milestone","01/02/2001","01/02/2001 00:00:01")
			oItems:AddBar(oItems:AddItem("Milestone EBN "),"MilestoneEBN","01/02/2001","01/02/2001 00:00:01")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
758
How can I change the visual appearance of the summary bar using EBN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAEGg4BGICg6AADACAxRDAMgBQKAAzQFAYZhhBaERiGEaIJhUAIIRZGMQxXAcMQvDSKQJhGDAADEMgyAJCIxjPIgZBoGqPBpASQJUhkMocR7HMygBIkSRNA8kMwxdQEaw9ECRIDpGaYWTFDhsABTVQRLL0Tw9ISERqoSSaGgkCYaA7CNJ0PBNJSjJ6LJZGURbKqyCQ1DBbUB3BaUaQ9JaKa7pKa7cpWKIqSxEMrxcLFcT5DSbYDxGjLEhmPZBVZQNBxtJbFQHWJCNgzVAdOAAfzQM70GpMQoWJYeVpEObSBD1dABTCBczADYoex7ID+aJuGiYVZdWxJOjfbhkTTIJAaCawABrWxR8iHN5paTnUpzDjwbg0kqRRyr+XwjA8Go/HSBp6g6KJTFcGpWmYdg8H6dJTH0EZelueBfBuLwyBMd50nIfR+kmXB4BECQUAaEYMHQHRHCGFRYI2ZAwEIExghQZA2EIQoGGoEhOgGBBYlAeYYHM" +;
		"WJcDcGx4HYHoHmICIFjeBohkaDAAC2DAjBYJIIiKSI2CSC5hjQJBsCOCwYiIKoGmKWJkn6DANkiWgzCwYwolAcQkksWJaCuDohlicg2hDQR+EELBInKcJohMJBomILoGmISQuESFBOgkOQDg+SoTEyfoXCUSImDyGZhjkaI1hcJgTnoXgACYCYKG2GQkEkVJchKIoZDIbIciYKY+HEP4mlmThSg+aBIlKBYUCUKgGHyG4jEkPoKiAKI6D6EokGkSgyECF5jEKVJZD+aYqHKG4nGoCh+iKJ4qEqBokh+KYag6JoqmqKo2iWJpqgKRJHDiT5qk6NYtCsapmjiLprHqdo6i8awan6QovCwOp6kSLQsBsHpGjKbBbBaMYhm0CgalILBtBsUpTiGUIUAQgIA==")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars():CallMethod("Copy","Task","Summary")
				oBar:SetProperty("Color",0x1000000)
				oBar:Height := 16
		oG2antt:Columns():Add("Tasks")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Task 2"),"Summary","01/05/2001","01/07/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
757
How can I change the visual appearance of the task bar using EBN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAEGg4BGoCg6AADACAxRDAMgBQKAAzQFAYZhhBaERiGEaIJhUAIIRZGMQxXAcMQvDSKQJhGLhQiSJoJDSBEgSXDIZQ5D6OZYACDJQACJYJTbAYzyPJkPRAA6EZCmGAwCglf5HABRb7xNLkbQ8GySKJnWCQJhoD5BSLCNRUTRFFQtGgZBpEWwLCjQNQwWLKFoTJIEPSBDKqYDoKYqTgOOZOThHQz3HakQRdAa/ZpnaKpUo2d47XjMWBwGA0EzeAAGaxoShqdoiFaGU7UOJVJBOGwHK6BchoMAKbp6XoVWRaOAWLZWVABM7XLZxbLccyGfZ1XhdV5UbqUMznR7PNrjLKIJpCOJbbyAFwgBaeQABYLhK7iHRmi8XYwjMWpjFWOx1GIB5LmgdB4HCEBECSIBpDGHQOicIwokYPImikEIJj6eJIloEgogSc40FGcJEFiYZIG2VIoAURw1g2QxyAQNwNAMPJOgIYI4CoDIBmAeAKBIUpQDU" +;
		"KJYDoTpIB4vxgmgdgNgeYZDDoFw7CEJhQn+BohmKfImCWSZRlgYwikYMQ0gwF4DniTA/gwBJYjQYwsgoIg6AyCRQDiIJODAZBImoOguAmMZ4lQLIJjOMI3CYZJpEIT4KiKSI6DqD5ZGAAgHC2DAjBYR4SGUGYGE+GIlCmFhRhIB5iFAbwWsiJgMhoCoxngV4ZCcSYOHaGYnHmIg8COJpoCoOISmSWZeHWHgoEkRoAg4EIYB4NogmiSgKg6GRjGoJgFh+ZJKDaBYjmgaQygiBRUHmbhoDsTAyiqIIoioGoOw8aoKhKKoemeOIaAeF5HmqHoqiyKxKgYaN/locgBiuZRojoVIok8cwsjaMBLGqDoAhGIpoEYWYEmAIxUkQLZmgiYg2g2I4JiCQwuAqWIOIkEAQICA==")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("Color",0x1000000)
				oBar:Height := 16
		oG2antt:Columns():Add("Tasks")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/05/2001","01/07/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
756
How can I change the visual appearance of the task bar using EBN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAEGg4BZsIQAAYAQGKIYBkAKBQAGaAoDDMMILQiMQwjRBMKgBBCLIxiGK4DhiGoZATCMbDBIcSwSGgCJCjeS4ZDKHIXSxFUKTBAcSQTGyBRokaYZRi6A4+TRPETTWAEcABHSbQCoKTKAoCHpLQLMYxDKItJSpGYaRgqWCaZpuUIaUzKVbxbK9CSMGiQbIsOJrBqqQozWZHVITLR9VgBNqga7uGR5DoqdovU5dVTVda9Ly5LSsMQvfALCqOe45URdNp3RiVBYfI6+cZvfJLWh4NqeAbCMC1UJoYhlUKCBg0TRoVo9AIDX5QWaYXC0AkBA==")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("Color",0x1000000)
				oBar:Height := 16
		oG2antt:Columns():Add("Tasks")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/05/2001","01/07/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
755
Is there any way to change the units and count of units used in resizing or moving a bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL oLevel
	LOCAL h,h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:FirstVisibleDate := "06/21/2005"
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:ResizeUnitCount := 8
			oChart:UnitWidth := 64
			oLevel := oChart:Level(0)
				oLevel:Label := "<b><%mmm%></b> <%dd%>"
				oLevel:DrawGridLines := .T.
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:AddBar(h,"Task","06/22/2005","06/23/2005 16:00:00")
			h1 := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(h1,"","06/22/2005","06/24/2005",,"some <font Comic Sans MS;12><a>text</a></font> here")
			h1 := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(h1,"Task","06/23/2005 08:00:00","06/28/2005")
			oItems:AddLink("Link1",h,"",h1,"")
			oItems:SetProperty("Link","Link1",6/*exLinkStartPos*/,0)
			oItems:SetProperty("Link","Link1",12/*exLinkText*/,"<bgcolor=FFFFFF> Link <a>1</a> </bgcolor>")
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
754
When trying to resize, move or create a bar, it appears that you can only resize, move or create it in the units that were specified for the level in the timeline. Is there any way to change the units used in resizing or moving a bar
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h,h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:FirstVisibleDate := "06/21/2005"
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:UnitWidth := 64
			oChart:Level(0):Label := "<b><%mmm%></b> <%dd%>"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:AddBar(h,"Task","06/22/2005","06/23/2005 16:00:00")
			h1 := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(h1,"","06/22/2005","06/24/2005",,"some <font Comic Sans MS;12><a>text</a></font> here")
			h1 := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(h1,"Task","06/23/2005 08:00:00","06/28/2005")
			oItems:AddLink("Link1",h,"",h1,"")
			oItems:SetProperty("Link","Link1",6/*exLinkStartPos*/,0)
			oItems:SetProperty("Link","Link1",12/*exLinkText*/,"<bgcolor=FFFFFF> Link <a>1</a> </bgcolor>")
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
753
How can I clip the HTML text or caption inside the bar
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oBar := oG2antt:Chart():Bars:Item("Task")
			oBar:Pattern := 32/*exPatternBox*/
			oBar:Height := 13
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K1","This is a bit of text that get's clipped")
			oItems:SetProperty("ItemBar",h,"K1",4/*exBarHAlignCaption*/,3)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
752
How to show the overallocation/workload histogram

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h,h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:NonworkingDays := 0
			oChart:SetProperty("PaneWidth",.F.,70)
			oChart:FirstVisibleDate := "06/20/2005"
			oChart:HistogramVisible := .T.
			oChart:HistogramHeight := 64
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("HistogramCriticalColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oBar:HistogramPattern := 512/*exBezierCurve*/
				oBar:HistogramType := 1/*exHistOverAllocation*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:AddBar(h,"Summary","06/21/2005","07/01/2005")
			h1 := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(h1,"Task","06/21/2005","06/28/2005")
			h1 := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(h1,"Task","06/23/2005","07/01/2005","E")
			oItems:SetProperty("ItemBar",h1,"E",21/*exBarEffort*/,5)
			h1 := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(h1,"Task","06/25/2005","06/27/2005","E")
			oItems:SetProperty("ItemBar",h1,"E",21/*exBarEffort*/,2)
			oItems:SetProperty("ItemBar",h1,"E",3/*exBarCaption*/,"move/resize this")
			oItems:SetProperty("ItemBar",h1,"E",4/*exBarHAlignCaption*/,18)
			oItems:SetProperty("ItemBar",h1,"E",6/*exBarToolTip*/,"Click the bar and move or resize it. The histogram-graph will be updated.")
			oItems:AddLink("Link1",h,"",h1,"E")
			oItems:SetProperty("Link","Link1",6/*exLinkStartPos*/,0)
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
751
How to show the overload histogram

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h,h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:NonworkingDays := 0
			oChart:SetProperty("PaneWidth",.F.,70)
			oChart:FirstVisibleDate := "06/20/2005"
			oChart:HistogramVisible := .T.
			oChart:HistogramHeight := 64
			oBar := oChart:Bars:Item("Task")
				oBar:HistogramPattern := 258/*0x100+exPatternDot*/
				oBar:HistogramType := 0/*exHistOverload*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:AddBar(h,"Summary","06/21/2005","07/01/2005")
			h1 := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(h1,"Task","06/21/2005","06/28/2005")
			h1 := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(h1,"Task","06/23/2005","07/01/2005","E")
			oItems:SetProperty("ItemBar",h1,"E",21/*exBarEffort*/,5)
			h1 := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(h1,"Task","06/25/2005","06/27/2005","E")
			oItems:SetProperty("ItemBar",h1,"E",21/*exBarEffort*/,2)
			oItems:SetProperty("ItemBar",h1,"E",3/*exBarCaption*/,"move/resize this")
			oItems:SetProperty("ItemBar",h1,"E",4/*exBarHAlignCaption*/,18)
			oItems:SetProperty("ItemBar",h1,"E",6/*exBarToolTip*/,"Click the bar and move or resize it. The histogram-graph will be updated.")
			oItems:AddLink("Link1",h,"",h1,"E")
			oItems:SetProperty("Link","Link1",6/*exLinkStartPos*/,0)
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
750
How can I align the text/caption on the scroll bar
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:SetProperty("ScrollPartCaption",1/*exHScroll*/,512/*exLowerBackPart*/,"left")
		oG2antt:SetProperty("ScrollPartCaptionAlignment",1/*exHScroll*/,512/*exLowerBackPart*/,0/*LeftAlignment*/)
		oG2antt:SetProperty("ScrollPartCaption",1/*exHScroll*/,128/*exUpperBackPart*/,"right")
		oG2antt:SetProperty("ScrollPartCaptionAlignment",1/*exHScroll*/,128/*exUpperBackPart*/,2/*RightAlignment*/)
		oG2antt:ColumnAutoResize := .F.
		oG2antt:Columns():Add(Transform(1,""))
		oG2antt:Columns():Add(Transform(2,""))
		oG2antt:Columns():Add(Transform(3,""))
		oG2antt:Columns():Add(Transform(4,""))

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
749
How do I programmatically control the position of the horizontal scroll bar in the chart area, so I can specify a range of dates to scorll within
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,56)
			oChart:SetProperty("ScrollRange",0/*exStartDate*/,"01/01/2001")
			oChart:SetProperty("ScrollRange",1/*exEndDate*/,"01/31/2001")
			oChart:FirstVisibleDate := "01/12/2001"
		oG2antt:SetProperty("ScrollPartCaption",2/*exHChartScroll*/,512/*exLowerBackPart*/,Transform(oG2antt:Chart:ScrollRange(0/*exStartDate*/),""))
		oG2antt:SetProperty("ScrollPartCaptionAlignment",2/*exHChartScroll*/,512/*exLowerBackPart*/,0/*LeftAlignment*/)
		oG2antt:SetProperty("ScrollPartCaption",2/*exHChartScroll*/,128/*exUpperBackPart*/,Transform(oG2antt:Chart:ScrollRange(1/*exEndDate*/),""))
		oG2antt:SetProperty("ScrollPartCaptionAlignment",2/*exHChartScroll*/,128/*exUpperBackPart*/,2/*RightAlignment*/)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/15/2001","01/18/2001","K1")
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/05/2001","01/11/2001","K1")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
748
How can I programmatically control the position of the "splitter" between the item list on the left side and the gantt chart on the right
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():SetProperty("PaneWidth",.T.,196)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
747
How can I add a milestone bar and some text in the chart area

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Milestone","01/02/2001","01/02/2001",,"<a1>text</a> outside")
			oItems:SetProperty("ItemBar",h,,4/*exBarHAlignCaption*/,18)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
746
How can I display or align the bar's caption or text outside of the bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:DefaultItemHeight := 32
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/03/2001","01/05/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",3/*exBarCaption*/,"<b>to do</b>")
			oItems:SetProperty("ItemBar",h,"K1",4/*exBarHAlignCaption*/,18)
			oItems:SetProperty("ItemBar",h,"K1",5/*exBarVAlignCaption*/,16)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
745
How can I display or align the bar's caption or text outside of the bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/04/2001","01/06/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",3/*exBarCaption*/,"to do")
			oItems:SetProperty("ItemBar",h,"K1",4/*exBarHAlignCaption*/,16)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
744
How can I display or align the bar's caption or text outside of the bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",3/*exBarCaption*/,"to do ")
			oItems:SetProperty("ItemBar",h,"K1",4/*exBarHAlignCaption*/,18)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
743
Is there any option to keep the working days being constant while user moves the bar
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():FirstVisibleDate := "01/01/2002"
		oG2antt:Chart():Bars():Add("Task:Split"):Shortcut := "Task"
		oG2antt:Columns():Add("Task")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2002","01/04/2002","A")
			oItems:SetProperty("ItemBar",h,"A",20/*exBarKeepWorkingCount*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
742
Is there any option to count or to specify the working days

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():FirstVisibleDate := "01/01/2002"
		oG2antt:Columns():Add("Task")
		oG2antt:Chart():Bars():Add("Task:Split"):Shortcut := "S"
		oG2antt:Chart():SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"S","01/03/2002","01/04/2002","A")
			oItems:SetProperty("ItemBar",h,"A",258/*exBarWorkingCount*/,4)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
741
How do I select the next row/item
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddItem("Item 1")
			oItems:AddItem("Item 2")
			oItems:AddItem("Item 3")
			oItems:SetProperty("SelectItem",oItems:NextVisibleItem(oItems:FocusItem()),.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
740
How do I get the selected bars or links

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():AllowSelectObjects := 1/*exSelectBarsOnly*/
		oG2antt:Chart():FirstVisibleDate := "01/01/2002"
		oG2antt:Columns():Add("Task")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2002","01/04/2002","A")
			oItems:AddBar(h,"Task","01/06/2002","01/10/2002","B")
			oItems:SetProperty("ItemBar",h,"A",257/*exBarSelected*/,.T.)
		oG2antt:EndUpdate()
		DevOut( "Bars" )
		DevOut( Transform(oG2antt:Items:SelectedObjects(1/*exSelectBarsOnly*/),"") )
		DevOut( "Links" )
		DevOut( Transform(oG2antt:Items:SelectedObjects(2/*exSelectLinksOnly*/),"") )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
739
How can I allow a single link being selected in the chart

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():AllowSelectObjects := 18/*exSelectSingleObject+exSelectLinksOnly*/
		oG2antt:Chart():FirstVisibleDate := "01/01/2002"
		oG2antt:Columns():Add("Task")
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2002","01/04/2002","A")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/06/2002","01/10/2002","B")
			oItems:AddLink("AB",h1,"A",h2,"B")
			oItems:AddLink("BA",h2,"B",h1,"A")
			oItems:SetProperty("Link","AB",257/*exLinkSelected*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
738
How can I allow a single bar being selected in the chart

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():AllowSelectObjects := 17/*exSelectSingleObject+exSelectBarsOnly*/
		oG2antt:Chart():FirstVisibleDate := "01/01/2002"
		oG2antt:Columns():Add("Task")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2002","01/04/2002","A")
			oItems:AddBar(h,"Task","01/06/2002","01/10/2002","B")
			oItems:SetProperty("ItemBar",h,"A",257/*exBarSelected*/,.T.)
			oItems:AddLink("AB",h,"A",h,"B")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
737
How do I define the visual appearance of the bar by using your EBN/skin files

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oG2antt:Chart():Bars():CallMethod("Copy","Task","EBN"):SetProperty("Color",0x1000000)
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"EBN","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Item 2"),"Task","01/02/2001","01/04/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
736
Is it possible to have an "empty box" pattern for the bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():Bars():CallMethod("Copy","Task","Box"):Pattern := 32/*exPatternBox*/
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Box","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
735
How do I enable resizing ( changing the height ) the items at runtime
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:ItemsAllowSizing := -1/*exResizeItem*/
		oG2antt:DrawGridLines := 1/*exHLines*/
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:Columns():Add("Column")
		oG2antt:Items():AddItem("Item 1")
		oItems := oG2antt:Items()
			oItems:SetProperty("ItemHeight",oItems:AddItem("Item 2"),48)
		oG2antt:Items():AddItem("Item 3")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
734
How do I enable resizing all the items at runtime
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:ItemsAllowSizing := 1/*exResizeAllItems*/
		oG2antt:DrawGridLines := 1/*exHLines*/
		oG2antt:Columns():Add("Column")
		oG2antt:Items():AddItem("Item 1")
		oItems := oG2antt:Items()
			oItems:SetProperty("ItemHeight",oItems:AddItem("Item 2"),48)
		oG2antt:Items():AddItem("Item 3")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
733
How can I use your EBN files in the histogram

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:HistogramVisible := .T.
			oChart:HistogramHeight := 32
			oBar := oChart:Bars:Item("Task")
				oBar:HistogramPattern := 0/*exPatternEmpty*/
				oBar:SetProperty("HistogramColor",0x1000000)
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/03/2001","01/07/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
732
How can I draw only the shape of the bars in the histogram

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:HistogramVisible := .T.
			oChart:HistogramHeight := 32
			oBar := oChart:Bars:Item("Task")
				oBar:HistogramPattern := 512/*exBezierCurve*/
				oBar:SetProperty("HistogramColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/03/2001","01/07/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
731
How can I draw only the shape of the bars in the histogram

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:HistogramVisible := .T.
			oChart:HistogramHeight := 32
			oBar := oChart:Bars:Item("Task")
				oBar:HistogramPattern := 256/*0x100+*/
				oBar:SetProperty("HistogramColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/03/2001","01/07/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
730
How can I change the color of bars in the histogram

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:HistogramVisible := .T.
			oChart:HistogramHeight := 32
			oBar := oChart:Bars:Item("Task")
				oBar:HistogramPattern := 6/*exPatternBDiagonal*/
				oBar:SetProperty("HistogramColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/03/2001","01/07/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
729
How can I show my bars in the histogram

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:HistogramVisible := .T.
			oChart:HistogramHeight := 32
			oChart:Bars:Item("Task"):HistogramPattern := 6/*exPatternBDiagonal*/
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/03/2001","01/07/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
728
I'm trying to use the percentage display in my gantt's bars. Unfortunately, I don't see any percentage on the gantt chart

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oBar := oG2antt:Chart():Bars():CallMethod("Copy","Task","BarName")
			oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oBar:Pattern := 6/*exPatternBDiagonal*/
		oG2antt:Chart():Bars():Add("BarName%Progress"):Shortcut := "Percent"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Percent","01/02/2001","01/06/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",12/*exBarPercent*/,0.4)
			oItems:SetProperty("ItemBar",h,"K1",14/*exBarShowPercentCaption*/,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
727
How can I show the histogram
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():LevelCount := 2
		oG2antt:Chart():Level(0):Label := 0
		oLevel := oG2antt:Chart():Level(1)
			oLevel:Label := "<%mr%>"
			oLevel:Unit := 16/*exMonth*/
		oG2antt:Chart():HistogramVisible := .T.

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
726
How I can show Months in Time Unit panel into Roman numerals

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():LevelCount := 2
		oG2antt:Chart():Level(0):Label := 0
		oLevel := oG2antt:Chart():Level(1)
			oLevel:Label := "<%mr%>"
			oLevel:Unit := 16/*exMonth*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
725
Can I show a bar with a different vertical position

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Opaque")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K1")
			h := oItems:AddItem("Transparent and Opaque")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",18/*exBarOffset*/,"-3")
			oItems:SetProperty("ItemBar",h,"K1",19/*exBarTransparent*/,80)
			oItems:AddBar(h,"Task","01/03/2001","01/07/2001","K2")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
724
How can I show transparent and opaque bars in the same chart

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Opaque")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K1")
			h := oItems:AddItem("Transparent and Opaque")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",18/*exBarOffset*/,"-3")
			oItems:SetProperty("ItemBar",h,"K1",19/*exBarTransparent*/,80)
			oItems:AddBar(h,"Task","01/03/2001","01/07/2001","K2")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
723
How can I draw bars using transparent colors

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():ShowTransparentBars := 60
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Chart():Bars():CallMethod("Copy","Task","TaskR"):SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oG2antt:Chart():SetProperty("PaneWidth",.F.,48)
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Item 1")
			oItems:AddBar(h,"Task","01/02/2001","01/05/2001","A")
			oItems:AddBar(h,"TaskR","01/04/2001","01/07/2001","B")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
722
How do I select bars and links in the chart area, by dragging
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():AllowSelectObjects := 3/*exSelectObjects*/
		oG2antt:Chart():FirstVisibleDate := "01/01/2002"
		oG2antt:Columns():Add("Task")
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2002","01/04/2002","A")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/06/2002","01/10/2002","B")
			oItems:AddLink("AB",h1,"A",h2,"B")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
721
How do I remove, delete the objects like bars and links selected in the chart area
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():AllowSelectObjects := 3/*exSelectObjects*/
		oG2antt:Chart():FirstVisibleDate := "01/01/2002"
		oG2antt:Columns():Add("Task")
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2002","01/04/2002","A")
			oItems:SetProperty("ItemBar",h1,"A",257/*exBarSelected*/,.T.)
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/06/2002","01/10/2002","B")
			oItems:AddLink("AB",h1,"A",h2,"B")
		oG2antt:EndUpdate()
		oG2antt:Chart():RemoveSelection()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
720
How do I select links and bars in the chart area

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():AllowSelectObjects := 3/*exSelectObjects*/
		oG2antt:Chart():FirstVisibleDate := "01/01/2002"
		oG2antt:Columns():Add("Task")
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2002","01/04/2002","A")
			oItems:SetProperty("ItemBar",h1,"A",257/*exBarSelected*/,.T.)
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/06/2002","01/10/2002","B")
			oItems:SetProperty("ItemBar",h2,"B",257/*exBarSelected*/,.T.)
			oItems:AddLink("AB",h1,"A",h2,"B")
			oItems:SetProperty("Link","AB",257/*exLinkSelected*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
719
How do I select links in the chart area

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():AllowSelectObjects := 2/*exSelectLinksOnly*/
		oG2antt:Chart():FirstVisibleDate := "01/01/2002"
		oG2antt:Columns():Add("Task")
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2002","01/04/2002","A")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/06/2002","01/10/2002","B")
			oItems:AddLink("AB",h1,"A",h2,"B")
			oItems:SetProperty("Link","AB",257/*exLinkSelected*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
718
How do I select bars, or tasks in the chart area
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():AllowSelectObjects := 1/*exSelectBarsOnly*/
		oG2antt:Chart():FirstVisibleDate := "01/01/2002"
		oG2antt:Columns():Add("Task")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2002","01/04/2002","A")
			oItems:AddBar(h,"Task","01/06/2002","01/10/2002","B")
			oItems:SetProperty("ItemBar",h,"A",257/*exBarSelected*/,.T.)
			oItems:AddLink("AB",h,"A",h,"B")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
717
Can I change the Task bar so it display a Progress or a Percent bar, but it is splitted when the task intersect a non working area

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:ShowTransparentBars := 60
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:Bars():Add("Task%Progress:Split"):Shortcut := "Task"
			oChart:SetProperty("PaneWidth",.F.,48)
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Item 1")
			oItems:AddBar(h,"Task","01/02/2001","01/16/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",12/*exBarPercent*/,0.15)
			oItems:SetProperty("ItemBar",h,"K1",14/*exBarShowPercentCaption*/,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
716
Can I change the Task bar so it display a Progress or a Percent bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:Bars():Add("Task%Progress"):Shortcut := "Task"
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Item 1")
			oItems:AddBar(h,"Task","01/02/2001","01/05/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",12/*exBarPercent*/,0.15)
			oItems:SetProperty("ItemBar",h,"K1",14/*exBarShowPercentCaption*/,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
715
How can I remove the filter
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oColumn := oG2antt:Columns():Add("Column")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterType := 1/*exBlanks*/
		oG2antt:ApplyFilter()
		oG2antt:ClearFilter()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
714
I use the ShowEmptyBars property, but I display seconds from 15 to 15, and the bars are not shown correctly. What can I do

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL oLevel
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:FirstVisibleDate := "01/01/2002"
			oChart:LevelCount := 2
			oChart:Level(0):Label := 1048576
			oLevel := oChart:Level(1)
				oLevel:Label := "<%ss%>"
				oLevel:Count := 15
			oChart:ShowEmptyBars := 15
			oChart:ShowEmptyBarsUnit := 16777216/*exSecond*/
			oChart:SetProperty("PaneWidth",.F.,48)
		oG2antt:Columns():Add("Task")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/01/2002 00:00:15","01/01/2002 00:00:15","A")
			oItems:AddBar(h,"Task","01/01/2002 00:01:15","01/01/2002 00:01:30","B")
			oItems:AddLink("AB",h,"A",h,"B")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
713
I need the bar works like in the MS Project, where task from 1/1/2001 to 1/1/2001 must display 1 day
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Chart():ShowEmptyBars := 1
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/01/2001","01/01/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
712
I have a bar that has the start and end date identical. Nothing is displayed. What can I do
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Chart():ShowEmptyBars := 1
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/02/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
711
How can I display seconds and bars for 15 to 15

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL oLevel
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():AllowCreateBar := 1/*exCreateBarAuto*/
		oG2antt:Chart():FirstVisibleDate := "01/01/2002"
		oG2antt:Chart():LevelCount := 2
		oG2antt:Chart():ShowEmptyBars := 0
		oG2antt:Chart():Level(0):Label := 1048576
		oLevel := oG2antt:Chart():Level(1)
			oLevel:Label := "<%ss%>"
			oLevel:Count := 15
		oG2antt:Chart():SetProperty("PaneWidth",.F.,48)
		oG2antt:Chart():Bars():CallMethod("Copy","Task","Task2"):SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oG2antt:Columns():Add("Task")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/01/2002 00:00:15","01/01/2002 00:00:45","A")
			oItems:AddBar(h,"Task2","01/01/2002 00:01:15","01/01/2002 00:01:45","B")
			oItems:AddLink("AB",h,"A",h,"B")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
710
How can I vertically display the column's caption, in the header

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("A"):HeaderVertical := .T.
		oG2antt:Columns():Add("B"):HeaderVertical := .T.
		oG2antt:Columns():Add("H"):HeaderVertical := .F.

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
709
How can I copy a predefined bar
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():Bars():CallMethod("Copy","Task","T2"):SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"T2","01/02/2001","01/04/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
708
How can I define my own custom bar, using my icons or pictures

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oBars
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oBars := oG2antt:Chart():Bars()
			oBars:AddShapeCorner(12345,1)
			oBars:AddShapeCorner(22345,2)
			oBar := oBars:Add("T2")
				oBar:StartShape := 22345/*0x5740+exShapeIconCircleUp1*/
				oBar:EndShape := 12345/*0x3020+exShapeIconVBar+exShapeIconRight*/
				oBar:SetProperty("EndColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oBar:Pattern := 2/*exPatternDot*/
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,255 } )  , .F. ))
				oBar:Shape := 19/*exShapeThinCenter*/
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"T2","01/02/2001","01/04/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
707
How can I access a predefined bar
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001")
		oG2antt:Chart():Bars():Item("Task"):SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
706
How can I access a predefined bar
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001")
		oG2antt:Chart():Bars():Item("Task"):SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
705
How can I remove all predefined bars
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
704
How can I remove a predefined bar
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
703
How do I get the number of predefined bars
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add(Transform(oG2antt:Chart():Bars():Count(),""))

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
702
How can I change the shape of the task bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oBar := oG2antt:Chart():Bars():CallMethod("Copy","Task","T2")
			oBar:EndShape := 2/*exShapeIconDown1*/
			oBar:SetProperty("EndColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"T2","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Item 2"),"Task","01/02/2001","01/04/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
701
How can I change the ending shape for all task bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oBar := oG2antt:Chart():Bars:Item("Task")
			oBar:EndShape := 1/*exShapeIconUp1*/
			oBar:SetProperty("EndColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN